<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>词多多代理商平台</title>
    <include file="Index:header"/>

     <script type="text/javascript">
        $(function(){
            $(".help-side dl dd:eq(1)").addClass('cur');
        })
        $(function(){
            $("#top #topcon .nav li:eq(2)").addClass('cur');
        })
    </script>
    <script src="__PUBLIC__/js/main.js" type="text/javascript" charset="UTF-8"></script>
    <!--开始/暂停按钮样式开始-->
    <style type="text/css">

        .rtd{
            padding-left:15px;
        }
        .wz{
            padding-left:25px;
        }
    </style>
    <!--开始/暂停按钮样式结束-->
</head>

<body>
    <include file="Index:top"/>
    <div id="main">
        <include file="Site:left"/>

        <div id="main_right" class="container">
            <div class="title">添加站点</div>

            <div id="proxyinfo">
                <form name="form1" id="form1" class="form" showOnMouseOver="false">
                    <div class="mt30 ml100">
                        <table class="tableStyle" formMode="transparent">                           
                            <tr>
                                <td align="right">
                                    公司名称：
                                </td>
                                <td class="wz" id="wz">
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    用&nbsp;&nbsp;户&nbsp;名：
                                </td>
                                <td class="rtd">
                                    <input type="text" class="validate[required,custom[onlyLetter] input" name="Username" id="u_name" style="width:200px;" onblur="ajaxname();"/>
                                </td>
                                <td>
                                    <div class="validation_info">请输入用户名</div>
                                </td>
                            </tr>
                            

                            <tr>
                                <td align="right">
                                    站&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点：                                    
                                </td>
                                <td class="rtd">
                                    <input name="Domain" type="text" class="validate[required,custom[domain] input" id="Domain" style="width:200px;"/>
                                </td>
                                <td>
                                    <div class="validation_info">例如www.ciduoduo.com</div>
                                </td>
                            </tr>

                            <tr>
                                <td align="right">
                                    站点名称：                                    
                                </td>
                                <td class="rtd">
                                    <input type="text" class="validate[required,custom[chinese],length[4,20] input" name="Webname" id="Webname" style="width:200px;"/>
                                </td>
                                <td>
                                    <div class="validation_info">请输入站点名称</div>
                                </td>
                            </tr>

                            <tr style="height:60px;text-align:center">
                                <td></td>
                                <td>
                                    <input type="hidden" id="user_id" name="user_id"/>
                                    <input class="button green" type="button" name="button" id="button" value="提&nbsp;&nbsp;交" onclick="validateForm('#form1','__URL__/site_add')"/>
                                </td>
                                <td></td>
                            </tr>
                        </table>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <include file="Index:footer"/>
    <script type="text/javascript">

        function ajaxname(){
            var name = $('#u_name').val();
            if(name){
            $.ajax({
                url:"__URL__/ajax_company",
                type:"POST",
                data:{'Username':name},
                cache:false,
                dataType:"json",
                success:function(data){
                     if(data.status == "success"){
                        $('#wz').text(data.Msg);
                        $('#user_id').val(data.user_id);
                        $("#button").attr("disabled",false);
                     }else{
                        msgerr(data.Msg);
                        $('#wz').empty();
                        $("#button").attr("disabled",true);
                     }
                }
            });
        }
        }



        $(function() {
            $("#domain").sSelect();
        });
    </script>
</body>

</html>